package com.lansi.fb.truck.bean;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

public class Truck implements Serializable {
	

	/**
	 * 
	 */
	private static final long serialVersionUID = -3490472312928007968L;
	private Integer id;
	private String sn;             //车牌
	private String type;           //类型：1      2
	private String typeStr;        //     油罐车     垃圾车
	private String brand;          //车型
	private String driver;         //驾驶员姓名
	private String drivercompany;  //驾驶员所属公司
	private String cardid;         //工卡号
	private Date cardassign;     //发卡时间
	private Date cardrecyle;     //收卡时间
	private String recyle;         //是否已回收：1   2
	private String recyleStr;      //         是      否
	private String memo;           //备注
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getSn() {
		return sn;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getTypeStr() {
		return typeStr;
	}
	public void setTypeStr(String typeStr) {
		this.typeStr = typeStr;
	}
	public String getBrand() {
		return brand;
	}
	public void setBrand(String brand) {
		this.brand = brand;
	}
	public String getDriver() {
		return driver;
	}
	public void setDriver(String driver) {
		this.driver = driver;
	}
	public String getDrivercompany() {
		return drivercompany;
	}
	public void setDrivercompany(String drivercompany) {
		this.drivercompany = drivercompany;
	}
	public String getCardid() {
		return cardid;
	}
	public void setCardid(String cardid) {
		this.cardid = cardid;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCardassign() {
		return cardassign;
	}	
	public void setCardassign(Date cardassign) {
		this.cardassign = cardassign;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCardrecyle() {
		return cardrecyle;
	}
	public void setCardrecyle(Date cardrecyle) {
		this.cardrecyle = cardrecyle;
	}
	public String getRecyle() {
		return recyle;
	}
	public void setRecyle(String recyle) {
		this.recyle = recyle;
	}
	public String getRecyleStr() {
		return recyleStr;
	}
	public void setRecyleStr(String recyleStr) {
		this.recyleStr = recyleStr;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	@Override
	public String toString() {
		return "Truck [id=" + id + ", sn=" + sn + ", type=" + type + ", typeStr=" + typeStr + ", brand=" + brand
				+ ", driver=" + driver + ", drivercompany=" + drivercompany + ", cardid=" + cardid + ", cardassign="
				+ cardassign + ", cardrecyle=" + cardrecyle + ", recyle=" + recyle + ", recyleStr=" + recyleStr
				+ ", memo=" + memo + "]";
	}
	public Truck() {
		
	}
	
	public Truck(Integer id, String sn, String type, String typeStr, String brand, String driver, String drivercompany,
			String cardid, Date cardassign, Date cardrecyle, String recyle, String recyleStr, String memo) {
		super();
		this.id = id;
		this.sn = sn;
		this.type = type;
		this.typeStr = typeStr;
		this.brand = brand;
		this.driver = driver;
		this.drivercompany = drivercompany;
		this.cardid = cardid;
		this.cardassign = cardassign;
		this.cardrecyle = cardrecyle;
		this.recyle = recyle;
		this.recyleStr = recyleStr;
		this.memo = memo;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
		result = prime * result + ((cardassign == null) ? 0 : cardassign.hashCode());
		result = prime * result + ((cardid == null) ? 0 : cardid.hashCode());
		result = prime * result + ((cardrecyle == null) ? 0 : cardrecyle.hashCode());
		result = prime * result + ((driver == null) ? 0 : driver.hashCode());
		result = prime * result + ((drivercompany == null) ? 0 : drivercompany.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((memo == null) ? 0 : memo.hashCode());
		result = prime * result + ((recyle == null) ? 0 : recyle.hashCode());
		result = prime * result + ((recyleStr == null) ? 0 : recyleStr.hashCode());
		result = prime * result + ((sn == null) ? 0 : sn.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		result = prime * result + ((typeStr == null) ? 0 : typeStr.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Truck other = (Truck) obj;
		if (brand == null) {
			if (other.brand != null)
				return false;
		} else if (!brand.equals(other.brand))
			return false;
		if (cardassign == null) {
			if (other.cardassign != null)
				return false;
		} else if (!cardassign.equals(other.cardassign))
			return false;
		if (cardid == null) {
			if (other.cardid != null)
				return false;
		} else if (!cardid.equals(other.cardid))
			return false;
		if (cardrecyle == null) {
			if (other.cardrecyle != null)
				return false;
		} else if (!cardrecyle.equals(other.cardrecyle))
			return false;
		if (driver == null) {
			if (other.driver != null)
				return false;
		} else if (!driver.equals(other.driver))
			return false;
		if (drivercompany == null) {
			if (other.drivercompany != null)
				return false;
		} else if (!drivercompany.equals(other.drivercompany))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (memo == null) {
			if (other.memo != null)
				return false;
		} else if (!memo.equals(other.memo))
			return false;
		if (recyle == null) {
			if (other.recyle != null)
				return false;
		} else if (!recyle.equals(other.recyle))
			return false;
		if (recyleStr == null) {
			if (other.recyleStr != null)
				return false;
		} else if (!recyleStr.equals(other.recyleStr))
			return false;
		if (sn == null) {
			if (other.sn != null)
				return false;
		} else if (!sn.equals(other.sn))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		if (typeStr == null) {
			if (other.typeStr != null)
				return false;
		} else if (!typeStr.equals(other.typeStr))
			return false;
		return true;
	}
	
	
}
